﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewDeportista.aspx.cs" Inherits="ViewDeportista" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="wucDeportista.ascx" TagName="wucDeportista" TagPrefix="ucCP" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .x-form-group .x-form-group-header-text {
        	background-color: #dfe8f6;
        }
        .x-label-text {
             /* font-weight: bold;*/
            font-size: 12px;
        }
        body  {
            font : normal 11px tahoma, arial, helvetica, sans-serif;
        }
        
        #customers-ct table { width : 100% !important; }
        
        #customers-ct th {
          
            font-weight : bold;
            padding : 8px 5px;
        }
       
        #customers-ct td {
            padding : 5px;
            border-bottom : 1px solid silver;
        }
        
        #customers-ct .letter-row {
            padding-top : 15px;
            border : none;
        }
        
        #customers-ct .letter-row h2 { font-size : 2em; }
        
        #customers-ct .header { padding : 10px 0px 10px 5px; }
        
        #customers-ct .header p { font-size : 2em; }

        #customers-ct .header a { margin-bottom : 10px; }
        
        .cust-name-over {
            cursor : pointer;
            background-color : #efefef;
        }
        
        #customers-ct .letter-row div {
            border-bottom : 2px solid #99bbe8;
            cursor : pointer;
            margin-bottom : 5px;
        }

        #customers-ct .letter-row div h2  { padding-left : 18px; }

        #customers-ct .letter-row div.collapsed { background-position : 0px 8px; }
        
        #customers-ct tr.collapsed { display : none; }
        
        .customer-label {
            font-weight : bold;
            font-size : 12px;
            padding : 5px 0px 5px 28px;            
            width : 150px;
        }
        select{
	font-size:11px;
}
.image-tip{
	padding:4px;
	height:98px;
	white-space:nowrap;
}
.image-tip img {
	margin-right:10px;
	border:2px solid #083772;
}
.image-tip b{
	color: #083772;
	display: block;
	margin-bottom: 4px;
}
.image-tip span{
	display: block;
	margin-bottom: 5px;
	margin-left: 5px;
}
.images{
	background: #fff url(center-bg.gif ) repeat-x top left;
	font: 11px Arial, Helvetica, sans-serif;
}
.images .thumb{
	background: #dddddd;
	padding:1px;
}
.images .thumb img{
	border:1px solid white;
	height: 100px;
	width: 230px;
}
.images .thumb-wrap{
	float: left;
	margin: 4px;
	margin-right: 0;
	padding: 5px;
}
.images .thumb-wrap span{
	display: block;
	overflow: hidden;
	text-align: center;
}
.images .x-view-selected .thumb{
	background:#8db2e3;
}
.images .loading-indicator {
	font-size:8pt;
	background-image:url(loading.gif);
	background-repeat: no-repeat;
	background-position: left;
	padding-left:20px;
	margin:10px;
}
.x-dd-drag-proxy .multi-proxy .thumb-img{
	height: 20px;
	width: 30px;
	margin:1px;
}
.x-dd-drag-proxy .thumb-img{
	height: 60px;
	width: 80px;
}
.image-node .x-tree-node-icon{
    margin-bottom:1px;
    height:15px;
}
.album-node .x-tree-node-icon, .album-btn{
    background-image:url(album.gif ) !important;
}
#folders{
	position:relative;
}
    </style>
   
</head>
<body>
<form id="form1" runat="server">
    <ext:ResourceManager ID="smVerProyecto" runat="server" />
    <script type="text/javascript" language="javascript" src="../resources/utilidades.js"></script>
    <ext:Store ID="StoreProgramas" runat="server">
        <Reader>
            <ext:JsonReader IDProperty="Key">
                <Fields>
                    <ext:RecordField Name="Value" />
                    <ext:RecordField Name="Key" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="StoreEstado" runat="server">
        <Reader>
            <ext:JsonReader IDProperty="Key">
                <Fields>
                    <ext:RecordField Name="Value" />
                    <ext:RecordField Name="Key" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="StoreEje" runat="server">
        <Reader>
            <ext:JsonReader IDProperty="Key">
                <Fields>
                    <ext:RecordField Name="Value" />
                    <ext:RecordField Name="Key" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="StoreTipo" runat="server">
        <Reader>
            <ext:JsonReader IDProperty="Key">
                <Fields>
                    <ext:RecordField Name="Value" />
                    <ext:RecordField Name="Key" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="StoreProyectos" runat="server" OnRefreshData="StoreRefresh" AutoLoad="false">
        <Reader>
            <ext:JsonReader IDProperty="Id">
                <Fields>
                    <ext:RecordField Name="Id" />
                    <ext:RecordField Name="Nombre" />
                    <ext:RecordField Name="FechaInicio" Type="Date" DateFormat="Y-m-dTh:i:s" />
                    <ext:RecordField Name="FechaFin" Type="Date" DateFormat="Y-m-dTh:i:s" />
                    <ext:RecordField Name="Presupuesto" />
                    <ext:RecordField Name="Latitud" />
                    <ext:RecordField Name="Longitud" />
                    <ext:RecordField Name="Viabilidad" />
                    <ext:RecordField Name="Dictamen" />
                </Fields>
            </ext:JsonReader>
        </Reader>
        <Proxy>
            <ext:PageProxy>
            </ext:PageProxy>
        </Proxy>
        <BaseParams>
            <ext:Parameter Name="cbxProgramas_bprm" Value="#{cbxProgramas}.getValue()" Mode="Raw" />
            <ext:Parameter Name="cbxEje_bprm" Value="#{cbxEje}.getValue()" Mode="Raw" />
            <ext:Parameter Name="cbxCategorias_bprm" Value="#{cbxCategorias}.getValue()" Mode="Raw" />
            <ext:Parameter Name="cbxEstado_bprm" Value="#{cbxEstado}.getValue()" Mode="Raw" />
            <ext:Parameter Name="txtNombrePrograma_bprm" Value="#{txtNombrePrograma}.getValue()"
                Mode="Raw" />
        </BaseParams>
    </ext:Store>
    <ext:Panel ID="Panel1" BodyStyle="padding:15px;background-color:#E7E4DD;" runat="server"
        AutoHeight="true">
        <Items>
            <ext:Panel ID="Panel2" runat="server" BodyStyle="background-color:Transparent;" Layout="Column">
                <Items>
                    <ext:Panel ID="Panel3" runat="server" Border="false" Header="false" BodyStyle="padding:10px;background-color:Transparent;"
                        ColumnWidth=".33" Layout="Form">
                        <Items>
                            <ext:ComboBox Editable="false" FieldLabel="Eje" ID="cbxEje" StoreID="StoreEje" runat="server"
                                DisplayField="Value" ValueField="Key" TypeAhead="true" ForceSelection="true"
                                AnchorHorizontal="95%" TriggerAction="All" Grow="true" GrowMax="300" EmptyText="Todos"
                                SelectOnFocus="true" AutoDataBind="True">
                                <Triggers>
                                    <ext:FieldTrigger Icon="Clear" HideTrigger="true" />
                                </Triggers>
                                <Listeners>
                                    <Select Handler="this.triggers[0].show();" />
                                    <BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
                                    <TriggerClick Handler="if(index == 0) { this.clearValue(); this.triggers[0].hide(); }" />
                                </Listeners>
                            </ext:ComboBox>
                            <ext:ComboBox Editable="false" FieldLabel="Estado" ID="cbxEstado" runat="server"
                                AnchorHorizontal="95%" StoreID="StoreEstado" DisplayField="Value" ValueField="Key"
                                TypeAhead="true" ForceSelection="true" TriggerAction="All" Grow="true" GrowMax="300"
                                EmptyText="Todos" SelectOnFocus="true" AutoDataBind="True">
                                <Triggers>
                                    <ext:FieldTrigger Icon="Clear" HideTrigger="true" />
                                </Triggers>
                                <Listeners>
                                    <Select Handler="this.triggers[0].show();" />
                                    <BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
                                    <TriggerClick Handler="if(index == 0) { this.clearValue(); this.triggers[0].hide(); }" />
                                </Listeners>
                            </ext:ComboBox>
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel4" Height="70" runat="server" Border="false" BodyStyle="padding:10px;background-color:Transparent;"
                        ColumnWidth=".34" Layout="Form">
                        <Items>
                            <ext:ComboBox Editable="false" FieldLabel="Programa" ID="cbxProgramas" runat="server"
                                AnchorHorizontal="95%" StoreID="StoreProgramas" DisplayField="Value" ValueField="Key"
                                TypeAhead="true" ForceSelection="true" TriggerAction="All" Grow="true" GrowMax="300"
                                EmptyText="Todos" SelectOnFocus="true" AutoDataBind="True">
                                <Triggers>
                                    <ext:FieldTrigger Icon="Clear" HideTrigger="true" />
                                </Triggers>
                                <Listeners>
                                    <Select Handler="this.triggers[0].show();" />
                                    <BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
                                    <TriggerClick Handler="if(index == 0) { this.clearValue(); this.triggers[0].hide(); }" />
                                </Listeners>
                            </ext:ComboBox>
                            <ext:TextField FieldLabel="Nombre" ID="txtNombrePrograma" runat="server" AnchorHorizontal="95%" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel5" Height="70" runat="server" Border="false" BodyStyle="padding:10px;background-color:Transparent;"
                        ColumnWidth=".33" Layout="Form">
                        <Items>
                            <ext:ComboBox Editable="false" FieldLabel="Tipo" ID="cbxCategorias" StoreID="StoreTipo"
                                AnchorHorizontal="95%" runat="server" DisplayField="Value" ValueField="Key" TypeAhead="true"
                                ForceSelection="true" TriggerAction="All" Grow="true" GrowMax="300" EmptyText="Todos"
                                SelectOnFocus="true" AutoDataBind="True">
                                <Triggers>
                                    <ext:FieldTrigger Icon="Clear" HideTrigger="true" />
                                </Triggers>
                                <Listeners>
                                    <Select Handler="this.triggers[0].show();" />
                                    <BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
                                    <TriggerClick Handler="if(index == 0) { this.clearValue(); this.triggers[0].hide(); }" />
                                </Listeners>
                            </ext:ComboBox>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Panel>
            <ext:Panel ID="Panel6" runat="server" AutoHeight="true" BodyStyle="padding-top:15px;background-color:Transparent;"
                Border="false">
                <Content>
                    <center>
                        <ext:Button runat="server" ID="btnBuscar" Text="Buscar" Icon="Find">
                            <%--
                        <DirectEvents>
                            <Click OnEvent="btnBuscar_Click">
                                <EventMask ShowMask="true" />
                            </Click>
                        </DirectEvents>
                            --%>
                            <Listeners>
                                <Click Handler="#{StoreProyectos}.load();" />
                            </Listeners>
                        </ext:Button>
                    </center>
                </Content>
            </ext:Panel>
        </Items>
    </ext:Panel>
    <ext:GridPanel ID="GridPanelProyectos" runat="server" StoreID="StoreProyectos" StripeRows="true"
        AutoWidth="true" AutoHeight="true" Title="Proyectos" AutoExpandColumn="NombreProyecto">
         <TopBar>
                <ext:Toolbar ID="Toolbar1" runat="server" AutoWidth="true">
                    <Items>
                        <ext:Label ID="Label1" runat="server" Text="Deportista">
                        </ext:Label>
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                        </ext:ToolbarFill>
                        <ext:Button ID="btnNuevoDeportista" runat="server" Text="Registrar Nuevo" Icon="NoteEdit">
                            <DirectEvents>
                                <Click OnEvent="NuevoDeportista_Click">
                                    <EventMask ShowMask="true" />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
         </TopBar>
        <ColumnModel ID="ColumnModel1" runat="server">
            <Columns>
                <ext:CommandColumn Header="Opciones" Width="70">
                    <Commands>
                        <ext:GridCommand CommandName="Editar" Icon="ApplicationEdit" ToolTip-Text="Editar datos del proyecto">
                        </ext:GridCommand>
                        <ext:GridCommand ToolTip-Text="Eliminar Proyecto" Icon="PageDelete" CommandName="Eliminar">
                        </ext:GridCommand>
                    </Commands>
                </ext:CommandColumn>
                <ext:Column ColumnID="NombreProyecto" Header="Proyecto" Width="180" Sortable="true"
                    DataIndex="Nombre" />
                <ext:Column Header="Fecha Inicio" Width="145" Sortable="true" DataIndex="FechaInicio">
                    <Renderer Fn="Ext.util.Format.dateRenderer('j \\de F \\de\\l Y')" />
                </ext:Column>
                <ext:Column Header="Fecha Fin" Width="145" Sortable="true" DataIndex="FechaFin">
                    <Renderer Fn="Ext.util.Format.dateRenderer('j \\de F \\de\\l Y')" />
                </ext:Column>
                <ext:Column Header="Presupuesto" Width="120" Sortable="true" DataIndex="Presupuesto">
                    <Renderer Format="UsMoney" />
                </ext:Column>
                <ext:Column DataIndex="Dictamen" Header="Dictamen" Width="60" Hidden="true" />
                <ext:Column Header="Viabilidad" Width="70" Sortable="true" DataIndex="Viabilidad"
                    Hidden="true" />
            </Columns>
        </ColumnModel>
        <DirectEvents>
            <Command OnEvent="EjecutarAccion">
                <ExtraParams>
                    <ext:Parameter Name="Comando" Value="command" Mode="Raw" Encode="False" />
                    <ext:Parameter Name="Nombre" Value="record.data.Nombre" Mode="Raw" />
                    <ext:Parameter Name="Id" Value="record.data.Id" Mode="Raw" />
                </ExtraParams>
                <EventMask ShowMask="true" />
                <Confirmation BeforeConfirm="if(command=='QViabilidad' || command=='QDictamen'){return true;} else {return false;}"
                    ConfirmRequest="true" Message="Esta seguro de quitar el " Title="Aviso" />
            </Command>
        </DirectEvents>
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
            </ext:RowSelectionModel>
        </SelectionModel>
        <BottomBar>
            <ext:PagingToolbar ID="ptbPerfilProyecto" runat="server" StoreID="StoreProyectos"
                DisplayInfo="true" DisplayMsg="Proyectos {0} - {1} of {2}" EmptyMsg="No existen Proyectos" />
        </BottomBar>
    </ext:GridPanel>
    <ucCP:wucDeportista runat="server" ID="wucDeportista1" />
    <ext:Window runat="server" ID="winUbicacion" Width="800" Height="400" Hidden="true"
        Modal="true" Maximizable="true">
        <Items>
        </Items>
    </ext:Window>
    </form>
</body>
</html>
